package rank1300;

import java.util.ArrayList;
import java.util.List;

/**
 * 1276. 不浪费原料的汉堡制作方案
 */
public class No1276 {
    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {
        if (tomatoSlices % 2 == 1 || tomatoSlices < cheeseSlices * 2 || tomatoSlices > cheeseSlices * 4)
            return new ArrayList<>();
        int sub = (tomatoSlices - cheeseSlices * 2) / 2;
        return List.of(sub, cheeseSlices - sub);
    }
}
